package org.example.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.pojo.Student;
import org.example.pojo.StudentQueryParam;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    @Select("select * from student where id=#{id}")
    Student getById(Integer id);

    List<Student> list(StudentQueryParam studentQueryParam);

    void delete(List<Integer> ids);

    void add(Student student);

    void update(Student student);
    @MapKey("name")
    List<Map<String, Object>> countStudentDegreeData();
    @MapKey("name")
    List<Map<String, Object>> countStudentClazzData();
}
